/**
 * 
 */
const Sequelize = require("sequelize");
const sequelize = require("../database/db-sequelize");

const Menu = sequelize.define("menu", {
    id: {
        type: Sequelize.STRING,
        autoIncrement: true,
        unique: true,
        primaryKey: true
    },
    menuname: {
        type: Sequelize.STRING
    },
    code: {
        type: Sequelize.STRING
    },
    icon: {
        type: Sequelize.STRING
    },
    type: {
        type: Sequelize.STRING,
        defaultValue: 0
    },
    parent_id: {
        type: Sequelize.STRING
    },
    children: []
}, {
    freezeTableName: true,
    timestamps: false
})

module.exports = Menu;